#! /bin/env python3
# coding: utf-8
from common.enable_debug import enable_debug
from common.load_cfg import load_cfg
from common.py_zabbix import PyZabbix

if __name__ == "__main__":
    config = load_cfg('zbx_info')
    if config["debug"] == True:
        enable_debug("PyZabbix")
    user = config["zbx_user"]
    pwd = config["zbx_pwd"]
    url = config["zbx_url"]
    zbx = PyZabbix(user, pwd, url)
    data=zbx.get_history()
    for i in data:
        print(data)
    #print(zbx.get_host_by_ip('10.101.70.243'))
